package com.gzhryc.net_marketing.cloud.account.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.net_marketing.cloud.account.dao.enums.CloudPayAccountOperateRecordEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 云支付账号操作记录
 * @version 2022-07-04
 */
@Table(name="cloud_pay_account_operate_record")
public class CloudPayAccountOperateRecord implements Serializable {

    private static final long serialVersionUID = 1L;

	@Id(autoIncrement = 100)
    protected Long id;

    @Column(name = "account_id",notNull = true,note="云支付账号ID")
    protected Long accountId;

    @Column(name = "money_type",notNull = true,note = "操作金额的类型，1：余额，2：冻结余额")
    protected Integer moneyType;

    @Column(notNull = true,note = "操作的金额")
    protected Integer money;

    @Column(notNull = true,note = "操作类型，1：增加，2：减少")
    protected Integer type;

    @Column(name = "operator_type",notNull = true,note="操作用户的类型，1：系统")
    protected Integer operatorType;

    @Column(name = "operator_name",notNull = true,note="操作用户名称")
    protected String operatorName;

    @Column(name = "operate_note",notNull = true,length = 1024,note = "操作说明")
    protected String operateNote;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date",notNull = true)
    protected Date createDate; // 操作时间

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Integer getMoneyType() {
        return moneyType;
    }

    public void setMoneyType(Integer moneyType) {
        this.moneyType = moneyType;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getOperateNote() {
        return operateNote;
    }

    public void setOperateNote(String operateNote) {
        this.operateNote = operateNote;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getMoneyTypeName(){
        return CloudPayAccountOperateRecordEnum.MoneyType.note(this.moneyType);
    }

    public String getMoneyStr(){
        return NumberTools.getMoneyStr(this.money);
    }

    public String getTypeName(){
        return CloudPayAccountOperateRecordEnum.Type.note(this.type);
    }

    public String getOperatorTypeName(){
        return CloudPayAccountOperateRecordEnum.OperatorType.note(this.operatorType);
    }
}
